home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / usr / bin / debconf-communicate < prev    next >
Text File  |  2008-10-10  |  608b  |  35 lines

  1. #!/usr/bin/perl -w
  2. # This file was preprocessed, do not edit!
  3.  
  4.  
  5.  
  6. use strict;
  7. use Debconf::Db;
  8. use Debconf::AutoSelect qw(:all);
  9. use Debconf::Config;
  10. use Debconf::Gettext;
  11.  
  12. Debconf::Db->load;
  13.  
  14. Debconf::Config->getopt(gettext("Usage: debconf-communicate [options] [package]"));
  15.  
  16. my $frontend=make_frontend();
  17. my $confmodule=make_confmodule();
  18. $confmodule->owner(shift) if @ARGV;
  19. my $code=127;
  20. autoflush STDOUT 1;
  21.  
  22. while (<>) {
  23.     chomp;
  24.     my $ret=$confmodule->process_command($_);
  25.     ($code, undef)=split(/ /, $ret, 2);
  26.     print "$ret\n";
  27. }
  28.  
  29. $frontend->shutdown;
  30. $confmodule->finish;
  31. Debconf::Db->save;
  32. exit $code;
  33.  
  34.  
  35.